Skip to content

chore(deps): migrate from eventide to kotatsu - #428

Merged
16bit-ykiko merged 1 commit into
mainfrom
chore/migrate-eventide-to-kotatsu
Apr 18, 2026
Merged

chore(deps): migrate from eventide to kotatsu#428
16bit-ykiko merged 1 commit into
mainfrom
chore/migrate-eventide-to-kotatsu

Conversation

@16bit-ykiko

@16bit-ykiko 16bit-ykiko commented Apr 17, 2026

Copy link
Copy Markdown
Member

Summary

  • The eventide dep was renamed to kotatsu with a broad rename of CMake identifiers, namespaces, header paths, and a few module reorgs (serdecodec, reflectionmeta, commonsupport). Align clice to the new names.
  • CMake: FetchContent target, option prefix (ETD_*KOTA_*, ETD_SERDE_*KOTA_CODEC_*), target names (eventide::{ipc::lsp,serde::toml,deco,zest}kota::{ipc::lsp,codec::toml,deco,zest}).
  • Namespaces: eventide::kota::, eventide::serde::kota::codec::, eventide::refl::kota::meta::. The short et alias is dropped — all usages now spell kota:: directly.
  • Headers: eventide/*kota/*, including special cases serde/serde/raw_value.hcodec/raw_value.h, ipc/json_codec.hipc/codec/json.h, common/meta.hsupport/type_traits.h, common/ranges.hsupport/ranges.h.
  • Kotatsu split JsonPeer / BincodePeer out of ipc/peer.h into the codec-specific headers; added kota/ipc/codec/{json,bincode}.h includes where those types are used.
  • Depends on refactor(build): split diagnostic warnings out of kota::project_options kotatsu#110 (already merged) to prevent -Wall -Wextra -Werror from transitively propagating out of kota::project_options.

Test plan

  • pixi run unit-test RelWithDebInfo — 518/518 pass (9 skipped, unchanged from main)
  • pixi run integration-test RelWithDebInfo — 119/119 pass
  • pixi run smoke-test RelWithDebInfo — 2/2 pass
  • pixi run format clean

Notes

  • tests/smoke/rapid_edit.jsonl was intentionally left untouched: the embedded #include "eventide/..." strings are frozen snapshots of file contents the client sent at record time, not clice source.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores

    • Updated internal dependencies from eventide to kota, including async runtime, IPC transport, serialization codec, and metadata libraries.
    • Updated build configuration and CMake variables to align with the new dependency.
  • Refactor

    • Migrated internal implementation to use kota namespace and APIs throughout the codebase.

The eventide library was renamed to kotatsu (clice-io/kotatsu) with a
broad rename of CMake identifiers, namespaces, header paths, and a few
module reorgs. Align clice to the new names and layout.

- FetchContent dep: eventide -> kotatsu
- CMake options: ETD_* -> KOTA_*, ETD_SERDE_* -> KOTA_CODEC_*
- CMake targets: eventide::{ipc::lsp, serde::toml, deco, zest}
                -> kota::{ipc::lsp, codec::toml, deco, zest}
- Namespaces: eventide:: -> kota::, eventide::serde:: -> kota::codec::,
  eventide::refl:: -> kota::meta::. Short `et` alias is dropped; all
  usages now reference kota:: directly.
- Headers: eventide/* -> kota/*, with renames:
  common/ -> support/, reflection/ -> meta/, serde/ -> codec/,
  serde/serde/raw_value.h -> codec/raw_value.h,
  ipc/json_codec.h -> ipc/codec/json.h.
- Include kota/ipc/codec/{json,bincode}.h where JsonPeer/BincodePeer is
  used (kotatsu moved those aliases out of ipc/peer.h into the
  codec-specific headers).
- .clang-format: add kota to the third-party include-group regex.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Apr 17, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

This pull request migrates the entire codebase from the eventide library to the kota library, replacing async/task types, IPC/protocol utilities, serialization codecs, CLI utilities, and all corresponding includes and namespace aliases throughout the project.

Changes

Cohort / File(s) Summary
Build System Configuration
.clang-format, CMakeLists.txt, cmake/package.cmake
Updated include category regex and CMake targets to reference kota instead of eventide. Replaced FetchContent_Declare dependency from eventide to kotatsu and migrated cache variables from ETD_* to KOTA_* prefixes.
Core Async/Concurrency Infrastructure
src/server/compile_graph.h, src/server/compile_graph.cpp, src/server/session.h, src/server/worker_pool.h, src/server/worker_pool.cpp, src/server/worker_common.h
Replaced coroutine/task return types from et::task<> to kota::task<>, event synchronization from et::event to kota::event, and cancellation primitives from et::cancellation_source to kota::cancellation_source. Updated all async utility calls (when_all, queue) to use kota equivalents.
IPC/Protocol/Serialization Stack
src/server/protocol.h, src/server/compiler.h, src/server/compiler.cpp, src/server/master_server.h, src/server/master_server.cpp, src/server/stateful_worker.cpp, src/server/stateless_worker.cpp
Migrated IPC types (JsonPeer, BincodePeer, StreamTransport) from eventide::ipc to kota::ipc, JSON/codec serialization from eventide::serde to kota::codec, and updated raw value container types and JSON helper functions accordingly.
LSP/Diagnostic Features
src/feature/feature.h, src/feature/diagnostics.cpp, docs/en/architecture.md
Updated LSP protocol and URI types from eventide::ipc::lsp to kota::ipc::lsp, including position encoding, range mapping, and URI parsing utilities. Updated architecture documentation to reflect new namespace references.
Workspace/Cache Management
src/server/workspace.h, src/server/workspace.cpp, src/server/indexer.h, src/server/indexer.cpp, src/server/config.cpp
Switched JSON serialization for cache persistence from eventide::serde::json to kota::codec::json, updated timer types from et::timer to kota::timer, and migrated LSP protocol aliases.
CLI/Main Entry Points
src/clice.cc, benchmarks/scan_benchmark.cpp, src/command/toolchain.cpp
Updated CLI/dependency-injection utilities from eventide::deco to kota::deco, replaced event loop and IPC transport types with kota equivalents, and updated reflection utilities from eventide::refl::enum_name to kota::meta::enum_name.
Syntax/Parsing
src/syntax/dependency_graph.cpp
Migrated async task vector types, event loop, and queue utilities from eventide to kota while preserving compilation graph scanning control flow.
Support Utilities
src/support/format.h
Updated reflection/range/type-trait dependencies from eventide::refl to kota::meta, including formatter specialization constraints and concept definitions for reflectable classes.
Unit Tests
tests/unit/feature/*.cpp, tests/unit/server/*.cpp, tests/unit/test/test.h, tests/unit/unit_tests.cc, tests/unit/server/worker_test_helpers.h
Updated all test protocol namespace aliases, coroutine return types, test framework includes, and worker helper infrastructure from eventide to kota equivalents.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~75 minutes

Possibly related PRs

Poem

🐰 Eventide's dusk has gently passed,
Kota's morning breaks at last—
Tasks and timers, queues anew,
Where async rabbits hop on through! 🐇✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 29.51% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the primary change: migrating the project's dependency from the eventide library to kotatsu. It is directly related to the main theme of the changeset.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/migrate-eventide-to-kotatsu

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (5)
cmake/package.cmake (1)

42-56: Consider pinning kotatsu to a commit or tag.

GIT_TAG main leaves the build subject to upstream drift and makes bisection harder. Since the PR notes a specific dependency on clice-io/kotatsu#110, pinning to that merge commit (or a release tag) would make builds reproducible without changing behavior today.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@cmake/package.cmake` around lines 42 - 56, The FetchContent entry for kotatsu
currently uses GIT_TAG main which allows upstream drift; replace the GIT_TAG
main line with a pinned commit hash or explicit release tag (the merge commit
for clice-io/kotatsu#110 or a released tag) so builds are reproducible — e.g.
update the kotatsu block (the lines that include kotatsu, GIT_REPOSITORY,
GIT_TAG main, GIT_SHALLOW TRUE) to use the chosen commit hash/tag instead of
"main" and keep FetchContent_MakeAvailable(kotatsu spdlog croaring flatbuffers)
as-is.
src/syntax/dependency_graph.cpp (1)

793-801: Nit: adjacent string literals look incidental.

The format string is split as "... next={} " "prefetch={}", which concatenates fine (7 placeholders, 7 args). It's unrelated to this migration, but if you happen to touch this line again, consider collapsing it into a single literal for readability.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/syntax/dependency_graph.cpp` around lines 793 - 801, The LOG_INFO call
currently uses two adjacent string literals ("... next={} " "prefetch={}") which
accidentally splits the format string; update the LOG_INFO invocation (the
format string in the LOG_INFO call near wave_num/current_wave/prefetch_tasks) to
use a single contiguous literal for readability (e.g., collapse into "...
next={} prefetch={}") while keeping the same placeholders and arguments
(wave_num, current_wave.size(), p1, p2, p3, next_wave.size(),
prefetch_tasks.size()).
src/server/worker_common.h (1)

10-13: LGTM — to_raw migrated cleanly.

The three new kota includes match the types used, and the template now returns kota::codec::RawValue via kota::codec::json::to_json<kota::ipc::lsp_config> with the same "null" fallback as before. The mirror copy in src/server/master_server.cpp (L33-37) is consistent.

Side note (not blocking): the to_raw helper is duplicated between this header and master_server.cpp. Since this header is included by both stateful_worker.cpp and stateless_worker.cpp, master_server.cpp could also just include worker_common.h and drop its static copy — worth a small follow-up cleanup if you want to consolidate.

Also applies to: 40-42

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/server/worker_common.h` around lines 10 - 13, The to_raw helper (which
returns kota::codec::RawValue via
kota::codec::json::to_json<kota::ipc::lsp_config> with the "null" fallback) is
duplicated in this header and in master_server.cpp; remove the static copy in
master_server.cpp and have master_server.cpp include worker_common.h instead so
there is a single to_raw implementation (ensure includes for
kota::codec::json::serializer, kota::codec::raw_value and kota::ipc::codec::json
remain available where to_raw is used).
src/server/compiler.cpp (2)

26-26: Rename the serde_raw alias to reflect the new codec terminology.

Since this PR renames eventide::serdekota::codec project-wide, carrying a serde_raw alias forward is misleading to readers. Consider renaming (e.g. raw_value / codec_raw) for consistency with the new naming.

✏️ Proposed rename
-using serde_raw = kota::codec::RawValue;
+using raw_value = kota::codec::RawValue;

(All serde_raw{...} usages below would need to be updated to match.)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/server/compiler.cpp` at line 26, Rename the misleading alias serde_raw to
a name matching the kota::codec terminology (e.g., raw_value) by changing the
alias declaration using serde_raw = kota::codec::RawValue; to using raw_value =
kota::codec::RawValue; and update all references of serde_raw throughout the
codebase (including uses in src/server/compiler.cpp and any other files) to
raw_value so the alias matches the new codec naming. Ensure you also update any
comments or docstrings that mention serde_raw to reflect the new name.

897-913: Inline JSON serialization duplicates worker_common.h::to_raw.

Both completion branches here replicate exactly the body of to_raw (from src/server/worker_common.h) but fall back to "[]" instead of "null". Consider extending to_raw to accept a fallback (or adding a to_raw_array helper) so these two sites can call the shared helper — reducing duplication and keeping the lsp_config plumbing in one place.

♻️ Sketch
// in worker_common.h
template <typename T>
inline kota::codec::RawValue to_raw(const T& value, std::string_view fallback = "null") {
    auto json = kota::codec::json::to_json<kota::ipc::lsp_config>(value);
    return kota::codec::RawValue{json ? std::move(*json) : std::string(fallback)};
}
-            auto json = kota::codec::json::to_json<kota::ipc::lsp_config>(items);
-            co_return serde_raw{json ? std::move(*json) : "[]"};
+            co_return to_raw(items, "[]");
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/server/compiler.cpp` around lines 897 - 913, The two completion branches
in compiler.cpp duplicate the JSON serialization logic found in worker_common.h;
update the shared helper (either extend to_raw in worker_common.h to accept a
fallback std::string_view or add a new to_raw_array helper) so it performs
kota::codec::json::to_json<kota::ipc::lsp_config>(...) and returns a
kota::codec::RawValue with the given fallback when json is null, then replace
the duplicated blocks in the Completion and CompletionContext::Import branches
to call the new helper (ensuring the Import branch uses fallback "[]") instead
of inlining the serialization.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@cmake/package.cmake`:
- Around line 42-56: The FetchContent entry for kotatsu currently uses GIT_TAG
main which allows upstream drift; replace the GIT_TAG main line with a pinned
commit hash or explicit release tag (the merge commit for clice-io/kotatsu#110
or a released tag) so builds are reproducible — e.g. update the kotatsu block
(the lines that include kotatsu, GIT_REPOSITORY, GIT_TAG main, GIT_SHALLOW TRUE)
to use the chosen commit hash/tag instead of "main" and keep
FetchContent_MakeAvailable(kotatsu spdlog croaring flatbuffers) as-is.

In `@src/server/compiler.cpp`:
- Line 26: Rename the misleading alias serde_raw to a name matching the
kota::codec terminology (e.g., raw_value) by changing the alias declaration
using serde_raw = kota::codec::RawValue; to using raw_value =
kota::codec::RawValue; and update all references of serde_raw throughout the
codebase (including uses in src/server/compiler.cpp and any other files) to
raw_value so the alias matches the new codec naming. Ensure you also update any
comments or docstrings that mention serde_raw to reflect the new name.
- Around line 897-913: The two completion branches in compiler.cpp duplicate the
JSON serialization logic found in worker_common.h; update the shared helper
(either extend to_raw in worker_common.h to accept a fallback std::string_view
or add a new to_raw_array helper) so it performs
kota::codec::json::to_json<kota::ipc::lsp_config>(...) and returns a
kota::codec::RawValue with the given fallback when json is null, then replace
the duplicated blocks in the Completion and CompletionContext::Import branches
to call the new helper (ensuring the Import branch uses fallback "[]") instead
of inlining the serialization.

In `@src/server/worker_common.h`:
- Around line 10-13: The to_raw helper (which returns kota::codec::RawValue via
kota::codec::json::to_json<kota::ipc::lsp_config> with the "null" fallback) is
duplicated in this header and in master_server.cpp; remove the static copy in
master_server.cpp and have master_server.cpp include worker_common.h instead so
there is a single to_raw implementation (ensure includes for
kota::codec::json::serializer, kota::codec::raw_value and kota::ipc::codec::json
remain available where to_raw is used).

In `@src/syntax/dependency_graph.cpp`:
- Around line 793-801: The LOG_INFO call currently uses two adjacent string
literals ("... next={} " "prefetch={}") which accidentally splits the format
string; update the LOG_INFO invocation (the format string in the LOG_INFO call
near wave_num/current_wave/prefetch_tasks) to use a single contiguous literal
for readability (e.g., collapse into "... next={} prefetch={}") while keeping
the same placeholders and arguments (wave_num, current_wave.size(), p1, p2, p3,
next_wave.size(), prefetch_tasks.size()).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: a046565d-754c-4477-924a-9c9b2d54871d

📥 Commits

Reviewing files that changed from the base of the PR and between d42d9d5 and b6d0603.

📒 Files selected for processing (46)
  • .clang-format
  • CMakeLists.txt
  • benchmarks/scan_benchmark.cpp
  • cmake/package.cmake
  • docs/en/architecture.md
  • src/clice.cc
  • src/command/toolchain.cpp
  • src/feature/diagnostics.cpp
  • src/feature/feature.h
  • src/server/compile_graph.cpp
  • src/server/compile_graph.h
  • src/server/compiler.cpp
  • src/server/compiler.h
  • src/server/config.cpp
  • src/server/indexer.cpp
  • src/server/indexer.h
  • src/server/master_server.cpp
  • src/server/master_server.h
  • src/server/protocol.h
  • src/server/session.h
  • src/server/stateful_worker.cpp
  • src/server/stateless_worker.cpp
  • src/server/worker_common.h
  • src/server/worker_pool.cpp
  • src/server/worker_pool.h
  • src/server/workspace.cpp
  • src/server/workspace.h
  • src/support/format.h
  • src/syntax/dependency_graph.cpp
  • tests/unit/feature/code_completion_tests.cpp
  • tests/unit/feature/document_link_tests.cpp
  • tests/unit/feature/document_symbol_tests.cpp
  • tests/unit/feature/folding_range_tests.cpp
  • tests/unit/feature/hover_tests.cpp
  • tests/unit/feature/inlay_hint_tests.cpp
  • tests/unit/feature/semantic_tokens_tests.cpp
  • tests/unit/feature/signature_help_tests.cpp
  • tests/unit/server/compile_graph_integration_tests.cpp
  • tests/unit/server/compile_graph_tests.cpp
  • tests/unit/server/module_worker_tests.cpp
  • tests/unit/server/pch_worker_tests.cpp
  • tests/unit/server/stateful_worker_tests.cpp
  • tests/unit/server/stateless_worker_tests.cpp
  • tests/unit/server/worker_test_helpers.h
  • tests/unit/test/test.h
  • tests/unit/unit_tests.cc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant